Reversing a Linked List
Iterative time complexity: O(n).
Iterative auxiliary space: O(1).
Recursive time complexity: O(n).
Recursive auxiliary space: O(n) because of the call stack.
The iterative solution is generally safer for very long lists because it avoids stack overflow.